package com.wxh.jwt.service.impl;

import com.wxh.jwt.model.User;
import com.wxh.jwt.repository.UserRepository;
import com.wxh.jwt.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @ClassName: UserServiceImpl
 * @Description: 用户实现类
 * @Author wxh
 * @Date: 2020/5/28 11:27
 * @Version V1.0.0
 * @Since 1.8
 */
@Service(value = "userService")
public class UserServiceImpl implements UserService {
    @Resource
    private UserRepository userRepository;

    @Override
    public User findUserByUserName(String userName) {
        User user = userRepository.findByUserName(userName);
        return user;
    }

    @Override
    public User findUserByUserId(String userId) {
        User user = userRepository.findByUserId(userId);
        return user;
    }
}
